package ru.space_game.gui;

import ru.space_game.core.Game;
import ru.space_game.resource.Sprite;

public class GuiManager {

	private MiniMap miniMap;

	private Announcer announcer;

	public void init() {
		Sprite sprite = Game.getInstance().getSprite("mini_map.png");
		miniMap = new MiniMap(Game.SCREEN_WIDTH - sprite.getWidth() / 2,
				sprite.getHeight() / 2 - 1, sprite);
		announcer = new Announcer();
		announcer.addMessage("youLose", new SimpleMessage(
				Game.SCREEN_WIDTH / 2, Game.SCREEN_HEIGHT / 2 - 50, "You lose",
				0xff0000, false));
		announcer.addMessage("youWin", new SimpleMessage(Game.SCREEN_WIDTH / 2,
				Game.SCREEN_HEIGHT / 2 - 50, "You win", 0xff0000, false));
		announcer.addMessage("pressAnyKey", new SimpleMessage(
				Game.SCREEN_WIDTH / 2, Game.SCREEN_HEIGHT / 2 - 25,
				"Press any key", 0xff0000, false));
	}

	public void draw() {
		miniMap.draw();
		announcer.draw();
	}

	public MiniMap getMiniMap() {
		return miniMap;
	}

	public void setMiniMap(MiniMap miniMap) {
		this.miniMap = miniMap;
	}

	public Announcer getAnnouncer() {
		return announcer;
	}

	public void setAnnouncer(Announcer announcer) {
		this.announcer = announcer;
	}

}
